<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>uiRouter路由定义超灵活嵌套路由</title>
		<script src="../org/angular.min.js"></script>
		<script src="../org/jquery.min.js" ></script>
		<script src="../org/angular-ui-router.js" ></script>
	</head>
	<body>
		<div ng-app="hd" ng-controller="ctrl">
			<div ui-view=''></div>
			<div ui-view='content'></div>
		</div>
		<script>
			var m = angular.module('hd',['ui.router']);
			m.config(['$stateProvider','$urlRouterProvider',function($stateProvider,$urlRouterProvider){
				//默认路由
				$urlRouterProvider.otherwise('/my');
				//定义路由规则
                $stateProvider.state('my',{
					url:'/my',
					views:{
						'@':{
							templateUrl:'link/my.html'
						},
						'content':{
							template:'欢迎来'
						}
					}
					
				})
                .state('my.video',{
					url:'/video',
					views:{
						'son@my':{
							templateUrl:'link/video.html'
						},
						'content@':{   //加@后不会在video中显示
							template:''
						}
					}
					
				})
			}])
			m.controller('ctrl',['$scope','$stateParams',function($scope,$stateParams){
				
            }]);
		</script>
	</body>
</html>

